<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>游记分享</title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link rel="stylesheet" type="text/css" href="iconfont/iconfont.css" />
		<link rel="stylesheet" type="text/css" href="css/all_css.css" />
		<link rel="stylesheet" type="text/css" href="css/weui/base.css" />
		<link rel="stylesheet" type="text/css" href="lib/weui.css" />
		<link rel="stylesheet" type="text/css" href="css/weui/jquery-weui.css" />
		<link rel="stylesheet" type="text/css" href="css/loadingCss/fakeloader.css" />
		<link rel="stylesheet" type="text/css" href="css/loadingCss/loading_css.css" />
		<style type="text/css">
			body {
				width: 100%;
				overflow-y: auto;
			}
			/**{
				border: 1px solid;
			}*/
			
			.roadSharing_main {
				max-width: 640px;
				min-width: 310px;
				margin: 0px auto;
				padding-bottom: 10px;
				margin-top: 20px;
			}
			
			.app_head_left {
				float: left;
				width: 8%;
				padding-top: 6px;
				padding-left: 6px;
			}
			
			.app_head_left a {
				color: #FFFFFF;
				font-size: 1.5em;
				font-weight: bold;
			}
			
			.app_head_mid {
				float: left;
				width: 57%;
				padding-top: 5px;
			}
			
			.app_head_right {
				float: right;
				width: 35%;
				text-align: right;
				padding-top: 10px;
				height: 100%;
				line-height: 25px;
			}
			
			.app_head_right img {
				width: 27px;
				margin-top: -4px;
			}
			
			.app_head_title {
				text-align: right;
				color: #FFFFFF;
				font-size: 1.6em;
				font-family: "宋体";
				font-weight: bold;
			}
			/* 底部发送信息输入框 */
			
			#sendInput_main {
				border-top: 1px solid #DEDEDE;
				height: 58px;
			}
			
			#sendInput_main div {
				height: 75%;
				margin-top: 8px;
			}
			
			.inputBorder {
				float: left;
				border: 1px solid #0070B4;
				border-radius: 8px;
				margin-left: 3%;
				width: 72%;
				text-align: center;
			}
			
			.btnSend {
				float: left;
				width: 25%;
			}
			
			#sendRoadSharingBtn {
				display: block;
				float: left;
				width: 80%;
				height: 95%;
				margin-left: 8%;
				border-radius: 10px;
				text-align: center;
				line-height: 40px;
				font-size: 1.15em;
				background-color: #007AFF;
				color: #FFFFFF;
				font-family: Tahoma, fzltxhk, "\5fae\8f6f\96c5\9ed1";
			}
			
			#sendRoadSharingMain {
				width: 90%;
				height: 100%;
				border: none;
				outline: none;
				color: #666666;
				font-size: 1.1em;
			}
			
			#nullDataImg {
				width: 50%;
				margin-top: 100px;
				margin-left: 25%;
				margin-right: 25%;
			}
			
			.collectDelBtn {
				float: right;
				width: 6%;
				margin-top: 12px;
				margin-right: 5px;
			}
			/* 删除完成按钮 */
			
			#delSharingFinishBtn {
				font-size: 1.3em;
			}
			/* loading 图标 */
			
			#sharingLoadingIcon {
				width: 8%;
				margin-left: 47%;
				margin-top: 140px;
			}
			
			.dashed {
				border: 1px dashed #CCCCCC;
				border-bottom: none;
			}
			
			.huafen_xuanzhong {
				background-color: #1296DB !important;
				color: #FFFFFF !important;
			}
			
			#huafen {
				text-align: center;
			}
			
			#huafen a {
				width: 30%;
				margin-left: 5%;
			}
			
			#huafenBtn{
				/*border: 1px solid #DEDEDE;*/
			}
			/*评价区域列表*/
			
			#tourSharingUl {
				padding: 12px;
			}
			
			#tourSharingUl li {
				height: 110px;
				border-bottom: 1px solid #D4D4D4;
				box-shadow: 0px 2px 2px #DEDEDE;
				margin-bottom: 10px;
				padding: 0 10px;
			}
			
			#tourSharingUl li p {
				height: 30%;
				padding-top: 8px;
			}
			
			#tourSharingUl li p span {
				padding-left: 35px;
			}
			
			#tourSharingUl li p img {
				width: 25px;
				vertical-align: middle;
				position: absolute;
			}
			
			#tourSharingUl li p:last-child img {
				width: 30px;
				margin-left: -2px;
			}
			
			.share_tourUsername {
				font-weight: bold;
				font-size: 16px;
			}
			
			.share_tourPlace {
				color: #F586DF;
				font-size: 1.1em;
				font-weight: bold;
			}
			
			.share_tourPlace,
			.share_tourUsername {
				float: left;
			}
			
			.share_time,
			.share_lable {
				float: right;
				color: #666666;
			}
			
			.share_pingjia {
				color: #999999;
				float: left;
				font-size: 0.9em;
				position: relative;
				top: 4px;
				display: block;
				float: left;
				width: 100%;
				white-space: nowrap;
				overflow: hidden;
				text-overflow: ellipsis;
			}
			/* 返回顶部按钮 */
			
			.returnTopBtn {
				position: fixed;
				right: 15px;
				bottom: 80px;
				width: 45px;
				height: 43px;
				border-radius: 8px;
				z-index: 999;
				background-color: #CCCCCC;
				padding: 6px;
				opacity: 0.7;
			}
			/*----按景点划分弹出层样式----*/
			
			#full,
			#full1,
			#full2 {
				max-width: 640px;
				min-width: 320px;
				width: 100%;
				margin: 0px auto;
				overflow: hidden;
				z-index: 1000;
			}
			
			#sharing_tanchu,
			#sharing_tanchu2,
			#add_tanchu1 {
				height: 100%;
				background-color: #FFFFFF;
			}
			
			#closeBtn i,
			.addPage_closeBtn i {
				color: #FFFFFF;
				font-size: 1.15em;
				position: relative;
				top: -6px;
				right: 8px;
			}
			
			.toolbar-inner {
				height: 70px !important;
			}
			
			.weui-row {
				background-color: #FFFFFF;
				margin-top: 15px;
			}
			/*底部弹出框的头部*/
			
			.tanchu_head {
				position: fixed;
				top: 0;
			}
			
			#full .app_head_left,
			#full1 .app_head_left {
				width: 4% !important;
			}
			
			#full .app_head_left a,
			#full1 .app_head_left a {
				margin-top: -3px;
				height: 0px;
			}
			
			#full .app_head_mid,
			#full1 .app_head_mid {
				width: 85%;
			}
			
			#full .app_head_title,
			#full1 .app_head_title {
				text-align: center;
				margin-top: 3px;
			}
			/*弹框内容部分*/
			
			.myMain {
				margin-top: 70px;
			}
			/*吉林城市列表ul li样式*/
			
			#JL_tourCity_list {
				padding: 15px 40px;
				width: 100%;
			}
			
			#JL_tourCity_list li {
				font-size: 20px;
				width: 40%;
				height: 12%;
				margin-left: 5%;
				margin-right: 5%;
				padding-top: 5.5%;
				font-size: 1.3em;
				font-family: "黑体";
				margin-top: 10%;
				/*box-shadow: 1px 2px 5px #C6F;*/
				border-radius: 50%;
				text-align: center;
				float: left;
			}
			/*城市下所有景点区域*/
			
			#tourPlace_list {
				/*padding: 8px 40px;*/
				width: 100%;
			}
			
			.tourPlace_list_title {
				border-bottom: 1px solid #DEDEDE;
				margin: 10px 15px;
				height: 40px;
			}
			
			#tourPlace_list_title_cityName {
				border-bottom: 3px solid #1296DB;
				margin-left: 15px;
				line-height: 15px;
				display: block;
				height: 39px;
				float: left;
				font-size: 1.5em;
				color: #666666;
				padding: 8px;
			}
			
			#tourPlace_list li {
				color: #444444;
				padding: 10px;
				padding-left: 25px;
				font-weight: bold;
				height: 50px;
				line-height: 28px;
				font-size: 1.16em;
			}
			
			#tourPlace_list li:nth-child(2n) {
				background-color: #EDEDED;
			}
			/*导航栏*/
			
			.weui_tab {
				width: 100%;
			}
			/*----导航栏样式----*/
			
			.weui_bar_item_on {
				background-color: #FFFFFF !important;
				color: #0070B4 !important;
			}
			
			.weui_navbar_item {
				color: #FFFFFF;
				background-color: #CCCCCC;
			}
			
			.weui_navbar_item b {
				font-size: 1.1em;
				display: block;
				height: 1.3em;
				line-height: 1.2em;
			}
			/*单个游记详情布局*/
			
			#yjMainMsg {
				width: 100%;
				height: 100%;
				padding: 15px 15px 5px 15px;
			}
			
			.yjMain_head p {
				float: left;
				width: 50%;
				height: 55px;
			}
			
			.yjMain_head p:nth-child(1) {
				text-align: left;
				line-height: 45px;
			}
			
			.yjMain_head p:nth-child(1) span {
				font-weight: bold;
				font-size: 1.2em;
				text-shadow: 2px 2px 2px lightblue;
			}
			
			.yjMain_icon {
				vertical-align: middle;
				margin-right: 5px;
			}
			
			.yjMain_head p:nth-child(2) {
				text-align: right;
				color: #808080;
			}
			
			.yjMain_head p:nth-child(2) span {
				color: #808080;
				font-weight: bold;
			}
			/*游记分享单个 图片位置*/
			
			.yjMain_pic {
				width: 100%;
				text-align: center;
			}
			/*用户无图片情况下加此DIV*/
			
			.nullPic {
				margin-top: 55px;
				height: 70px;
				line-height: 70px;
				font-weight: bold;
				font-size: 1.15em;
				color: #666666;
				text-shadow: 2px 2px 2px lightblue;
			}
			
			.yjMain_pic img {
				width: 31%;
				margin: 0.5%;
				height: 170px;
				box-shadow: 3px 3px 3px #808080;
			}
			
			.yjMain_notes {
				margin-top: 15px;
			}
			/*.notesTitle {
				
			}*/
			
			.notesTitle span {
				font-weight: bold;
				font-size: 1.2em;
				text-shadow: 2px 2px 2px lightblue;
			}
			/*评分*/
			
			.notesScore {
				float: right;
				color: #FFC504;
				font-size: 1.15em;
				height: 35px;
				margin-top: -15px;
				position: absolute;
				right: 15%;
				padding: 0 10px;
				background-color: #FFFFFF;
			}
			
			.notesScore i {
				font-size: 1.05em;
				width: 10px;
				margin-left: 10px;
			}
			
			.notesMain {
				margin-top: 35px;
				color: #888888;
				/*强制换行*/
				word-break: break-all;
			}
			
			.yjMain_notes hr {
				border: 1px dashed #FFC504;
				margin-top: 25px;
				width: 100%;
				margin-left: 0;
			}
			/*添加游记分享内部样式*/
			
			.jbMain input {
				border: none;
				float: right;
				width: 95%;
				outline: none;
				border-radius: 5px;
				height: 100%;
				color: #666666;
				font-size: 17px;
				padding-left: 5px;
			}
			
			.jbMain {
				width: 80%;
				height: 45px;
				margin-left: 10%;
				border: 1px solid #999999;
				border-radius: 5px;
				margin-bottom: 30px;
				text-align: center;
				background-color: #FFFFFF;
			}
			
			
			#xbText_input {
				width: 80%;
				margin-left: 10%;
				height: 80px;
				font-size: 15px;
				border: 1px solid #999999;
				color: #666666;
			}
			
			@media only screen and (max-width: 350px) {
				* {
					font-size: 0.95em;
				}
			}
		</style>
	</head>

	<body ontouchstart>
		<div class="roadSharing_main" id="roadSharing_main">
			<div class="index_head">
				<div class="app_head_left">
					<a onclick="tourShareReturnBtn()" class="iconfont">&#xe6d4;</a>
				</div>
				<div class="app_head_mid">
					<p class="app_head_title">游记分享</p>
				</div>
				<div class="app_head_right">
					<img src="img/tour/addtourBtn.png" onclick="jumpToNewSharing()" />
				</div>
			</div>
			<div class="weui_tab">

				<!--选择车站列表亦或吉林省内所有车站-->
				<div class="weui_navbar" id="stationNavbar">
					<a href="#yjList" id="btn1" class="weui_navbar_item weui_bar_item_on">
						<b>游记列表</b>
					</a>
					<a href="#yjMain" id="btn2" class="weui_navbar_item">
						<b>游记详情</b>
					</a>
				</div>
				<div class="weui_tab_bd">
					<div id="yjList" class="weui_tab_bd_item weui_tab_bd_item_active">
						<div id="huafen">
							<a href="javascript:;" class="huafen_xuanzhong weui_btn weui_btn_mini weui_btn_default" id="returnMainBtn" onclick="huafenType(this)">全部</a>
							<a href="javascript:;" class="weui_btn weui_btn_mini weui_btn_default open-popup" data-target="#full" id="huafenBtn" onclick="huafenType(this)">按景点划分</a>
						</div>
						<ul id="tourSharingUl">
							<img src="img/my/nullTourShare.png" style="display: none;" id="nullDataImg" />
							<img src="img/taxi/loading_icon.gif" id="sharingLoadingIcon" style="display: none;" />
							<!--<li>-->
							<!--第一行 用户手机号-->
							<!--<p>
							<img src="img/tour/tourPerson.png" />
							<span class="share_tourUsername">136****4569</span>
							<span class="share_time">发表于2017-10-27</span>
						</p>-->
							<!--第二行 地点-->
							<!--<p>
							<img src="img/tour/tourPlaceIcon.png" />
							<span class="share_tourPlace">长白山</span>
							<span class="share_lable">点击查看详情</span>
						</p>-->
							<!--第三行 分享及评论内容-->
							<!--<p>
							<img src="img/tour/tour_pingjia.png" />
							<span class="share_pingjia">阿根说他好看来信啦啦啦啦啦啦阿根说他好看来信啦啦啦啦啦啦阿根说他好看来信啦啦啦啦啦啦阿根说他好看来信啦啦啦啦啦啦阿根说他好看来信啦啦啦啦啦啦</span>
						</p>-->
							<!--</li>-->
						</ul>
					</div>
					<div id="yjMain" class="weui_tab_bd_item">
						<!--显示每条分享的详情信息-->
						<div id="yjMainMsg" style="display: none;">
							<div class="yjMain_head">
								<p>
									<img class="yjMain_icon" src="img/tour/tourPerson.png" />
									<span id="yjD1"></span>
								</p>
								<p>
									发表于<br />
									<span id="yjD2"></span>
								</p>
							</div>
							<div class="yjMain_pic" id="yjD3">
								<!--评论分享图片区域-->
								<div class="nullPic">
									用户未上传图片哦
								</div>
							</div>
							<div class="yjMain_notes">
								<p class="notesTitle"><img class="yjMain_icon" src="img/tour/tourPlaceIcon.png" /><span id="yjD4"></span></p>
								<hr />
								<p class="notesScore">评分<i class="iconfont" id="yjD5"></i></p>
								<p class="notesMain" id="yjD6"></p>
							</div>
						</div>
					</div>
				</div>

				<div id="full" class="weui-popup-container popup-bottom weui-popup-modal-visible">
					<div id="sharing_tanchu2" class="weui-popup-modal">
						<div class="toolbar">
							<div class="toolbar-inner tanchu_head index_head">
								<div class="app_head_left">
									<a href="javascript:;" class="picker-button close-popup" id="closeBtn"><i class="iconfont">&#xe706;</i></a>
								</div>
								<div class="app_head_left">
									<a class="iconfont" style="display: none;" id="tanchuReturnBtn">&#xe6d4;</a>
								</div>
								<div class="app_head_mid">
									<p class="app_head_title" id="title_jdCity" style="font-size: 19px;">选取所在市州或地区</p>
									<p class="app_head_title" id="title_jd" style="font-size: 19px; display: none;">选取景点</p>
								</div>
							</div>
							<div class="weui-row weui-no-gutter myMain">
								<!--吉林城市列表区域-->
								<ul id="JL_tourCity_list">
									<li value="cc">长春</li>
									<li value="jl">吉林</li>
									<li value="sy">松原</li>
									<li value="sp">四平</li>
									<li value="th">通化</li>
									<li value="yb">延边州</li>
									<li value="ly">辽源</li>
									<li value="bc">白城</li>
									<li value="bs">白山</li>
									<li value="cbs">长白山</li>
								</ul>
								<!--城市下所有景点区域-->
								<ul id="tourPlace_list" style="display: none;">
									<div class="tourPlace_list_title">
										<span id="tourPlace_list_title_cityName"></span>
									</div>
									<!--DOM动态添加所选市下的所有景点-->
								</ul>
							</div>
						</div>
					</div>
				</div>

			</div>
		</div>
		<img src="img/index/returnTop2.png" style="display: none;" class="returnTopBtn" />
		<div class="fakeloader"></div>
		<script src="js/jquery-1.11.0.js" type="text/javascript" charset="utf-8"></script>
		<script src="js/weui/jquery-weui.js" type="text/javascript" charset="utf-8"></script>
		<script src="js/md5.js" type="text/javascript" charset="utf-8"></script>
		<script src="js/back_end.js" type="text/javascript" charset="utf-8"></script>
		<script src="js/JL_city.js" type="text/javascript" charset="utf-8"></script>
		<!--<script src="js/loadingJs/fakeloader.js" type="text/javascript" charset="utf-8"></script>-->
		<script src="js/loadingJs/fakeloader.min.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
			var h = document.documentElement.clientHeight; //获取屏幕高度

			//返回按钮
			function tourShareReturnBtn() {
				if($("#btn1").hasClass("weui_bar_item_on")) { //当页面在列表展示页时
					window.location.href = "javascript:history.go(-1)";
				} else {
					//					$("#btn1").click(); //回到列表展示页
					//					$("#yjMainMsg").hide();
					window.location.reload();
				}
			}

			//景点划分 点击按钮事件
			function huafenType(t) {
				if($(t).hasClass("huafen_xuanzhong") && t.innerHTML == "全部") {
					$.alert("已按时间顺序展示全部游记分享", "提示");
				} else if(!$(t).hasClass("huafen_xuanzhong") || t.innerHTML == "按照景点划分") {
					$("#huafen a").removeClass("huafen_xuanzhong");
					$(t).addClass("huafen_xuanzhong");
					console.log()
					if($(t).html() == "全部") {
						getTourSharing();
						//						$("#huafenBtn").addClass("open-popup");
					} else if($(t).html() == "按景点划分") {
						getJLcityAll();
						$("#full").slideToggle(200);
						//						setTimeout("removeTanchu()", 300); //延时去除点击按景点划分按钮的跳出弹出框功能，在点击全部按钮过后 还原
					}
				}

			}

			//跳转至写分享
			function jumpToNewSharing() {
				if(!localStorage.userJson) {
					$.confirm("发表游记分享请您先登录", "提示", function() {
						window.location.href = "Login.html";
					});
				} else {
					window.location.href = "./moreHtml/add_yjfx.html";
				}
			}

			//去除点击按景点划分按钮的跳出弹出框功能
			//			function removeTanchu() {
			//				$("#huafenBtn").removeClass("open-popup");
			//			}

			//保存游记分享
			//type=save_travel_notes
			//SCENIC=景点名称
			//CREATEPERSON=用户名
			//NOTES=游记文字内容
			//TRAVELSTIME=旅游时间（yyyy-MM-dd HH:mm:ss）
			//PICTURE1=base64图片1
			//PICTURE2=base64图片2
			//PICTURE3=base64图片3
			//PICTURENAME1=图片名称1
			//PICTURENAME2=图片名称2
			//PICTURENAME3=图片名称3
			//SCORE=评分

			//游记信息模糊查
			//type=get_travel_notes
			//USERNAME=用户名

			//获取游记分享信息
			//type = get_travel_notes
			//USERNAME = 用户名
			//			var userName = JSON.parse(localStorage.userJson)[0].username;
			$(function() {
				getTourSharing();

				//				$("#huafenBtn").click();
			});

			//回到顶部功能
			window.onscroll = function() {
				var scroll_top = $(document).scrollTop();
				if(scroll_top != 0) {
					$(".returnTopBtn").show();
				} else if(scroll_top == 0) {
					$(".returnTopBtn").hide();
				}
			};
			//每当点击地图按钮的时候，页面都返回顶部
			$(".returnTopBtn").click(function() {
				$("body").animate({
					scrollTop: 0
				}, 300) //0.3秒回到顶部动画效果
			});

			//获取全部游记分享方法
			function getTourSharing(tourNameStr) {
				$("#nullDataImg").hide();
				$("#tourSharingUl li").remove(); //清空所有li
				$.ajax({
					type: "post",
					url: Url,
					data: {
						"type": "get_travel_notes",
						"FLAG": 2,
						"SCENIC": tourNameStr
					},
					async: false,
					cache: false,
					dataType: "jsonp", //数据类型为jsonp
					jsonp: "callbackparam", //服务端用于接收callback调用的function名的参数  
					jsonpCallback: "jsonpCallback1",
					success: function(data) {
						//						console.log(data);
						if(data.MSG == "失败") {
							$("#nullDataImg").show();
						} else {
							var d = data.DATA;
							var m = data.MDATA;
							if(isEncrypt(d, m)) {
								d = eval(d);
								//								console.log(d);
								for(var i = 0; i < d.length; i++) {
									var userstr1 = d[i].CREATEPERSON.substr(0, 3);
									var userstr2 = d[i].CREATEPERSON.substr(7);
									var user = userstr1 + "****" + userstr2; //用户手机号,隐藏中间4位
									var place = d[i].SCENIC; //景点名称
									var notes = d[i].NOTES; //游记内容文字
									var time = d[i].TRAVELSTIME.substring(0, 16); //游记发表时间
									var thisId = d[i].RECID; //此评论的唯一标识
									var hasPic = d[i].PICTURENAME1 == "" ? false : true;
									var li = $('<li onclick="tourOneNotes(this)" data-pic="' + hasPic + '" data-recid="' + thisId + '"></li>');
									var p1 = $('<p><img src="img/tour/tourPerson.png" /><span class="share_tourUsername">' + user + '</span><span class="share_time">发表于' + time + '</span></p>');
									var p2 = $('<p><img src="img/tour/tourPlaceIcon.png" /><span class="share_tourPlace">' + place + '</span><span class="share_lable">点击查看详情</span></p>');
									var p3 = $('<p><img src="img/tour/tour_pingjia.png" /><span class="share_pingjia">' + notes + '</span></p>');
									$("#tourSharingUl").append(li);
									$(li).append(p1, p2, p3);
								}
							} else {
								errMD();
							}
						}
					},
					error: function(data) {
						$.alert("连接超时，请检查网络设置", "提示");
					}
				});
				//获取单个游记分享信息
				//type=single_travel_notes
				//RECID=行标识
			}

			//展示吉林所有城市列表 方法
			function getJLcityAll() {
				$("#JL_tourCity_list").height(h - 100);
				var citys = $("#JL_tourCity_list li");
				for(var i = 0; i < citys.length; i++) {
					var shadowStr = getRandomColor();
					var colorStr = shadowStr.substr(12);
					$(citys[i]).css("box-shadow", shadowStr); //随机颜色边框阴影
					$(citys[i]).css("color", colorStr); //随机颜色字体					
				}
			}

			//获取随机颜色 赋值给城市列表
			function getRandomColor() {
				var r = parseInt(Math.random() * 10000) % 256;
				var g = parseInt(Math.random() * 10000) % 256;
				var b = parseInt(Math.random() * 10000) % 256;
				return "1px 2px 5px rgb(" + r + "," + g + "," + b + ")";
				//块元素阴影效果
			}

			//选取城市点击事件
			$("#JL_tourCity_list li").click(function() {
				var cityName = $(this).html(); //所选城市名
				var cityVal = $(this).attr("value"); //所选城市的拼音
				$("#JL_tourCity_list").hide(200);
				$("#tourPlace_list").show(200);
				$("#title_jdCity").hide();
				$("#title_jd").show();
				$("#tanchuReturnBtn").show();
				$("#tourPlace_list_title_cityName").html(cityName);
				$("#tourPlace_list li").remove();
				getCityTourPlace(cityVal);
			});

			//弹出框右上角的后退按钮
			$("#tanchuReturnBtn").click(function() {
				$("#tourPlace_list").hide(200);
				$("#JL_tourCity_list").show(200);
				$("#title_jd").hide();
				$("#title_jdCity").show();
				$(this).hide();
			});

			//点击关闭弹窗按钮
			$("#closeBtn i").click(function() {
				$("#returnMainBtn").click();
				$("#full").slideToggle(200);
			});

			//获取该市下的所有景点
			function getCityTourPlace(Area) {
				$.ajax({
					type: "post",
					url: Url,
					data: {
						"type": "tourism_info",
						"AREA": Area
					},
					async: false,
					cache: false,
					dataType: "jsonp", //数据类型为jsonp
					jsonp: "callbackparam", //服务端用于接收callback调用的function名的参数  
					jsonpCallback: "jsonpCallback1",
					success: function(data) {
						if(data.MSG == "成功") {
							var d = data.DATA;
							var m = data.MDATA;
							if(isEncrypt(d, m)) {
								d = eval(d);
								for(var i = 0; i < d.length; i++) {
									var jd = d[i].JQMC;
									var recid = d[i].RECID;
									var li = $('<li data-r="' + recid + '" onclick="getThisCityTour(this)">' + jd + '</li>');
									$("#tourPlace_list").append(li);
								}
							} else {
								errMD();
							}
						} else {
							$.alert("暂无数据", "提示");
						}
					},
					error: function(data) {
						$.alert("连接超时，请检查网络设置", "提示");
					}
				});
			}

			//点击城市下景点名触发事件
			function getThisCityTour(tt) {
				var tour = $(tt).attr("data-r");
				//					console.log(tour);
				$("#full").slideToggle(200);
				$("#tourPlace_list").hide(200);
				$("#JL_tourCity_list").show(200);
				$("#title_jd").hide();
				$("#title_jdCity").show();
				$("#tanchuReturnBtn").hide();
				getTourSharing(tour);
			}

			//获取单个评论的详情
			//type=single_travel_notes
			//RECID=行标识
			function tourOneNotes(t) {
				var has_pic = $(t).attr("data-pic");
				//				console.log(has_pic);
				if(has_pic == "true") {
					$(".fakeloader").fakeLoader({
						timeToHide: 3000,
						bgColor: "#1296DB",
						spinner: "spinner3"
					});
				} else {
					$(".fakeloader").fakeLoader({
						timeToHide: 300,
						bgColor: "#1296DB",
						spinner: "spinner3"
					});
				}

				$(".nullPic").hide();
				$("#btn2").click();
				var r = $(t).attr("data-recid");
				$.ajax({
					type: "post",
					url: Url,
					data: {
						"type": "single_travel_notes",
						"RECID": r
					},
					async: false,
					cache: false,
					dataType: "jsonp", //数据类型为jsonp
					jsonp: "callbackparam", //服务端用于接收callback调用的function名的参数  
					jsonpCallback: "jsonpCallback1",
					success: function(data) {
						if(data.MSG == "成功") {
							var d = data.DATA;
							var m = data.MDATA;
							if(isEncrypt(d, m)) {
								d = eval(d)[0];
								//									console.log(d);
								var user1 = d.CREATEPERSON.substr(0, 3);
								var user2 = d.CREATEPERSON.substr(7);
								var user = user1 + "****" + user2; //手机号
								var notes = d.NOTES; //评论
								var picArr = [d.PICTURE1, d.PICTURE2, d.PICTURE3];
								var place = d.SCENIC; //景点
								var score = parseInt(d.SCORE); //评分
								var time = d.TRAVELSTIME.substr(0, 16); //评论时间 年月日
								//评分：实心星星&#xe6ff;空心星星 &#xe702;
								//数据展示
								$("#yjD1").html(user); //添加用户名
								$("#yjD2").html(time); //添加发表时间
								getThreePic(picArr); //添加图片
								$("#yjD4").html(place); //添加景点名
								$("#yjD5").html(getStarStr(score)); //添加评分
								$("#yjD6").html(notes);
								$("#yjMainMsg").slideDown(500);
							} else {
								errMD();
							}
						} else {
							$.alert("暂无数据", "提示");
						}
					},
					error: function(data) {
						$.alert("连接超时，请检查网络设置", "提示");
					}
				});
			}

			//获取评分星星字符串
			function getStarStr(s) {
				var starF = "&#xe6ff;";
				var starE = "&#xe702;";
				var starStr = "";
				for(var i = 0; i < s; i++) {
					starStr += starF;
				}
				for(var j = 0; j < 5 - s; j++) {
					starStr += starE;
				}
				return starStr;
			}
			//获取1-3张图片方法
			function getThreePic(arr) {
				$("#yjD3 img").remove(); //清空原有图片
				if(arr[0] == "") {
					$(".nullPic").show();
				} else {
					for(var i = 0; i < arr.length; i++) {
						if(arr[i] != "") {
							var img = $('<img src="' + arr[i] + '"/>');
							$("#yjD3").append(img);
						}
					}
				}
			}
		</script>
	</body>

</html>